<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>贴纸列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
    $(function(){
        /* 全选 */
         $('.checkall').click(function(){
            var _self = this;
            $('.checkitem').each(function(){
                if (!this.disabled)
                {
                    $(this).attr('checked', _self.checked);
                }
            });
            $('.checkall').attr('checked', this.checked);
        });
    });
  //排序
    function doorder(key,value){
        var order = $('#order');
        order.attr('name',key);
        order.attr('value',value);
        
        $('#search').trigger('click');
    }
</script>
</head>
<body>
    <div class="container">
        <div class="flow">
            <div class="itemtitle">
                <h3>贴纸列表</h3>
                <ul>
                    <li><a href="?m=sns&s=sns_paster_edit_add.php"><span>添加贴纸</span></a></li>
                </ul>
            </div>
        </div>
        
        <div class="h35"></div>
        
                <form action="" method="get">
        <input type="hidden" name="m" value="sns">
        <input type="hidden" name="s" value="sns_paster.php">
        <table class="select_table">
            <tbody>
                <tr>
                    <td width="20">状态:</td>
                    <td width="30">
                        <select name="status">
                            <option value="">全部</option>
                            <option value="-1" <{if '-1'==$smarty.get.status}>selected<{/if}>>已删除</option>
                            <option value="1" <{if '1'==$smarty.get.status}>selected<{/if}>>正常显示</option>
                        </select>
                    </td>
                    <input type="hidden" id="order" name="" value="" />
                    <td><input id="search" type="image" src="<{$config.weburl}>/image/admin/search.gif" /></td>
                </tr>
            </tbody>
        </table>
        </form>
        
        <form action="" name="snsform" method="get">
        <input type="hidden" name="m" value="sns">
        <input type="hidden" name="s" value="sns_paster.php">
            <table class="table product">
	            <tbody>
	                <tr class="header">
	                    <th width="20"><input type="checkbox" class="checkall" ></th>
	                    <th width="50">显示顺序</th>
	                    <th width="50">贴纸ID</th>
	                    <th width="100">贴纸名称</th>
	                    <th width="100">图片</th>
	                    <th width="50"><a href="javascript:doorder('timeorder','<{if $smarty.get.timeorder==desc}>asc<{else}>desc<{/if}>');">添加时间</a></th>
	                    <th width="100">状态</th>
	                    <th width="100">操作</th>
	                </tr>
	                <{foreach item=list from=$de.list}>
	                <tr>
	                    <td><input type="checkbox" value="<{$list.id}>" class="checkitem" name="chk[]"></td>
	                    <td><input type="text" class="w50" maxlength="3" name="displayorder[<{$list.id}>]" value="<{$list.displayorder}>" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" onkeyup="value=value.replace(/[^\d]/g,'')" /></td>
	                    <td><{$list.id}></td>
	                    <td><{$list.name}></td>
	                    <td>
                            <img class="img" src="<{if $list.pic!=''}><{$list.pic}>/80<{else}>../image/admin/no_picture.jpg<{/if}>" onerror="this.src='../image/admin/sns_img_fail_min.jpg'" width="80" height="80" />
                        </td>
	                    <td><{$list.create_time}></td>
	                    <td>
	                    <{if '-1'==$list.status}>已删除<{/if}>
	                    <{if '1'==$list.status}>正常显示<{/if}>
	                    </td>
	                    <td><a href="?m=sns&s=sns_paster_edit_add.php&editid=<{$list.id}>"><input type='button' value='编辑'></a></td>
	                </tr>
	                <{foreachelse}>
	                <tr>
	                    <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
	                </tr>
	                <{/foreach}>
	            </tbody>
	            <tfoot>
	                <tr>
	                    <td colspan="99">
	                        状态设置:
	                        <select name="set_status">
	                            <option value="">--请选择--</option>
	                            <option value="-1" >删除</option>
	                            <option value="1" >正常</option>
	                        </select>
	                        <input type="hidden" name="act" value="op" />
	                        <input type="submit" value="提交" />
	                        <div class="page"><span style="float:left;line-height: 20px;"><{if $countpro}>共有<{$countpro}>条记录<{/if}></span><{$de.page}></div>
	                    </td>
	                </tr>
	            </tfoot>
	        </table>
	    </form>
    </div>
</body>
</html>